package com.example.mybatis_puls.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

/**
 * Created with IntelliJ IDEA.
 * ClassName: SexEnum
 * Package: com.example.mybatis_puls.enums
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-01-14
 * Time: 22:02
 */

@Getter
public enum SexEnum {
    MALE(1,"男"),
    FEMALE(2,"女");

    //通过枚举来实现功能  1.添加注解 2.在配置问价中 添加扫描的包
    @EnumValue  //将注解的值 存放到数据库中
    private Integer sex;
    private String sexName;

    SexEnum(Integer sex, String sexName) {
        this.sex = sex;
        this.sexName = sexName;
    }
}
